<?php
/* @var $this MedicineController */
/* @var $model Medicine */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'medicine-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'medicine_qty'); ?>
		<?php echo $form->textField($model,'medicine_qty'); ?>
		<?php echo $form->error($model,'medicine_qty'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'medicine_type'); ?>
		<?php echo $form->textField($model,'medicine_type'); ?>
		<?php echo $form->error($model,'medicine_type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'medicine_loc'); ?>
		<?php echo $form->textField($model,'medicine_loc',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'medicine_loc'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'inventory_id'); ?>
                <?php echo $form->dropDownList ($model, 'inventory_id', CHtml::listData(
                Inventory::model()->findAll(), 'id','medicine'),
                        array('prompt' => 'Select an medicine name')
                        ); ?>
                <?php echo $form->error($model,'inventory_id'); ?>
        </div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->